package com.micro.ai.template.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 创建工作流请求
 *
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "创建工作流请求")
public class WorkflowCreateRequest {

    @NotBlank(message = "工作流名称不能为空")
    @Size(min = 2, max = 200, message = "工作流名称长度必须在2-200之间")
    @Schema(description = "工作流名称", example = "客服工单处理流程", requiredMode = Schema.RequiredMode.REQUIRED)
    private String workflowName;

    @Schema(description = "工作流描述", example = "自动化处理客服工单的完整流程")
    private String description;

    @Schema(description = "工作流定义（JSON格式）", requiredMode = Schema.RequiredMode.REQUIRED)
    private Map<String, Object> definition;

    @Schema(description = "输入Schema（JSON Schema格式）")
    private Map<String, Object> inputSchema;

    @Schema(description = "输出Schema（JSON Schema格式）")
    private Map<String, Object> outputSchema;

    @Schema(description = "版本号", example = "1.0.0")
    private String version;

    @Schema(description = "标签列表", example = "[\"自动化\", \"客服\"]")
    private List<String> tags;

    @Schema(description = "是否启用", example = "true")
    private Boolean enabled;
}

